package view;

import javax.swing.*;

import model.*;

/**
 * the abstract class Abstractview
 * @author Arjan Frans, Alwin Rombout, Jelte Verbree, Brendan Kanters
 * @version 1.0
 */
public abstract class AbstractView extends JPanel {      
	private static final long serialVersionUID = 4326379902349820681L;
		protected Simulator simulator;

		/**
		 * add a view to the simulator
		 * @param simulator
		 */
        public AbstractView(Simulator simulator) {
                this.simulator=simulator;
                simulator.addView(this);
        }
        
        /**
         * 
         * @return the simulator
         */
        public Simulator getModel() {
                return simulator;
        }
        
        /**
         * update the views
         */
        public void updateView() {
                repaint();
        }
        
        /**
         * clear the views
         */
        public void clearView()
        {
        	
        }
}

